Keir Fraser [Mon, 20 Oct 2008 14:17:24 +0000 (15:17 +0100)]
xend: fix setting vcpus > VCPUs_max
From reading xend code related to changing number of vcpus it appears
setting the number of vcpus to a value greater than VCPUs_max is not
allowed on a running domain. This restriction is not honored by
setVCpuCount() in XendDomainInfo.py. Attached patch makes
setVCpuCount() fail if vcpus > VCPUs_max and domain is running.
Also, I think the changes should be reflected in managed config of
running domain if in fact the domain is managed - so unconditionally
call managed_config_save().
BTW, the original code is rather confusing. Essentially the same
actions are taken regardless if self.info['VCPUs_max'] > vcpus, just
the order of invocation is changed. But this doesn't seem to matter
since self.info['VCPUs_live'] is not subsequently used.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
Keir Fraser [Mon, 20 Oct 2008 14:15:19 +0000 (15:15 +0100)]
Add some necessary files to build IA64 VT-d.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Mon, 20 Oct 2008 14:14:55 +0000 (15:14 +0100)]
vtd: make the xen_in_range/tboot_in_range checkings also work for IA64.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Mon, 20 Oct 2008 14:13:50 +0000 (15:13 +0100)]
Define a macro IO_APIC_ID() for x86.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Mon, 20 Oct 2008 14:13:02 +0000 (15:13 +0100)]
iommu: make some functions (mainly MSI-related) dummy on IA64 for now.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Mon, 20 Oct 2008 14:11:41 +0000 (15:11 +0100)]
Add a new file xen/include/xen/hvm/irq.h to share common definitions.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Mon, 20 Oct 2008 14:11:19 +0000 (15:11 +0100)]
NMI watchdog: don't try to run too slow.
The way MSR writes of performance counters works means that Intel
CPUs running faster than about 2.1GHz can't set the NMI timer to 1Hz.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Keir Fraser [Mon, 20 Oct 2008 14:08:24 +0000 (15:08 +0100)]
blktap: Handle qcow backing files correctly.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Keir Fraser [Mon, 20 Oct 2008 14:05:48 +0000 (15:05 +0100)]
xend: Stub out vscsi_get_scsidevices() until issues are addressed.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Fri, 17 Oct 2008 13:15:37 +0000 (14:15 +0100)]
NMI watchdog: use new counter on Core/Core2 CPUs
The old CPU_CLK_UNHALTED performance counter no longer runs on Core or
Core2 CPUs. Use the new CPU_CLK_UNHALTED.CORE_P one.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Keir Fraser [Fri, 17 Oct 2008 11:12:50 +0000 (12:12 +0100)]
svm: Check exitcode for NRIP validity only in debug builds.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Fri, 17 Oct 2008 11:04:11 +0000 (12:04 +0100)]
vtd: code cleanup
Remove iommu_page_mapping/unmapping, which are redundant because
intel_iommu_map_page/unmap_page can handle their functions.
Correct IRTA_REG_EIMI_SHIFT to IRTA_REG_EIME_SHIFT.
and also remove useless declarations in iommu.c
Signed-off-by: Weidong Han <weidong.han@intel.com>
Keir Fraser [Fri, 17 Oct 2008 11:00:25 +0000 (12:00 +0100)]
Enable PCI serial devices for console messages
The basic issue is that some PCI serial devices use a non-standard
crystal to control the baud rate divisor. This patch enhances the
`com' parameter to enable you to specify the crystal frequency used by
the serial device. Since this parameter already allows you to specify
I/O address and IRQ this is all that is needed to get a PCI serial
device to work. With this patch the `com' parameter is now defined
as:
comN=BBB[/CCC][,NPS[,III[,IRQ]]]
Where `CCC' is the crystal frequency. Note that if you specify 0 for
`IRQ' Xen will run the serial device in polled mode, obviating the
need for interrupts (an advantage since this is the only way I was
able to get my PCI serial device to work).
As an example, I am using the xen boot command:
kernel /xen.gz com1=
3D115200,8n1,0xe880/921600,0
console=3Dcom1
Signed-off-by: Don Dugger <donald.d.dugger@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 16 Oct 2008 17:45:48 +0000 (18:45 +0100)]
NextRIPS support for forthcoming AMD processors
Future versions of AMD processors will support a feature called
NextRIPS or Next RIP Save. This feature causes the processor
to store the next sequential RIP of a guest in the VMCB on
most instruction interrupts. The hypervisor can use this
information to determine how much memory to read to determine
the intercepted instruction, modestly improving performance.
The following patch implements support for this feature.
Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
Keir Fraser [Thu, 16 Oct 2008 17:36:43 +0000 (18:36 +0100)]
Fix SCHEDOP_poll to avoid wakeup-waiting race on interrupt delivery.
Race found by Jan Beulich.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 16 Oct 2008 14:46:04 +0000 (15:46 +0100)]
xmalloc: Add pooled allocator interface.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 16 Oct 2008 10:09:50 +0000 (11:09 +0100)]
xmalloc: use tlsf algorithm
This patch replaces the Xen xmalloc engine with tlsf, an allocation
engine that is both more space efficient and time-bounded, especially
for allocation sizes between PAGE_SIZE/2 and PAGE_SIZE.
The file xmalloc.c is deprecated but not yet deleted. A simple
changein common/Makefile will change back to the legacy xmalloc/xfree
if needed for testing.
Code adapted from Nitin Gupta's tlsf-kmod, rev 229, found here:
http://code.google.com/p/compcache/source/browse/trunk/sub-projects/allocat=
ors/tlsf-kmod
with description and performance details here:
http://code.google.com/p/compcache/wiki/TLSFAllocator
(new Xen code uses 4K=3DPAGE_SIZE for the region size)
For detailed info on tlsf, see:
http://rtportal.upv.es/rtmalloc/
Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 16 Oct 2008 08:52:40 +0000 (09:52 +0100)]
vmx: set DR7 via DOMCTL_setvcpucontext
This patch is needed for a guest domain debugger
to support hardware watchpoint.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Keir Fraser [Thu, 16 Oct 2008 08:51:42 +0000 (09:51 +0100)]
xentrace: trace power management events.
Signed-off-by: Guanqun Lu <guanqun.lu@intel.com>
Keir Fraser [Thu, 16 Oct 2008 08:50:18 +0000 (09:50 +0100)]
Enhance XenAPI for pvSCSI
Basically, I implemented XenAPI for pvSCSI according to the patch of
XenAPI document which I sent before. However, I renamed the class
name of virtual SCSI devices to "DSCSI".
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Keir Fraser [Wed, 15 Oct 2008 14:58:09 +0000 (15:58 +0100)]
x86 cpuid: leaf 4 sub-index goes in %ecx, not %ebx
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Keir Fraser [Wed, 15 Oct 2008 14:57:20 +0000 (15:57 +0100)]
amd: fix CPUID mask option handling
c/s 18402 added command line options to AMD-specific code duplicating
ones already existing in Intel code. The generic command line parser
didn't support this scenario for integer options, however.
Additionally, the options added were using the same option string for
two different purposes.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Wed, 15 Oct 2008 14:56:26 +0000 (15:56 +0100)]
x86: make injection of spurious page faults configurable per domain
Some distro kernels do not handle spurious page faults so allow these
to be supressed on a per VM basis.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Keir Fraser [Wed, 15 Oct 2008 10:58:15 +0000 (11:58 +0100)]
vt-d: Fix MSI-x interrupt remapping
MSI-x may have multiple vectors, however in current interrupt
remapping code, one device only has one entry in interrupt remapping
table.
This patch adds 'remap_index' in msi_desc structure to track its index
in interrupt remapping table.
Signed-off-by: Haitao Shan <haitao.shan@intel.com>
Signed-off-by: Weidong Han <weidong.han@intel.com>
Keir Fraser [Wed, 15 Oct 2008 07:22:42 +0000 (08:22 +0100)]
x86: Fix non-debug build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 14 Oct 2008 18:19:48 +0000 (19:19 +0100)]
x86_emulate: Fix after decode changes. Valid opcode decode values must
be non-zero.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 14 Oct 2008 10:49:08 +0000 (11:49 +0100)]
iommu: Fix the build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 14 Oct 2008 10:29:46 +0000 (11:29 +0100)]
Missing file from prev c/s
Keir Fraser [Tue, 14 Oct 2008 10:29:14 +0000 (11:29 +0100)]
iommu: Move some 'boot_cpu_data.x86_vendor' related stuff into
arch-specific directory.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Tue, 14 Oct 2008 10:28:37 +0000 (11:28 +0100)]
vtd: Define msi_msg_{read,write}_remap_rte() to nothing for ia64.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Tue, 14 Oct 2008 10:12:02 +0000 (11:12 +0100)]
Add documentation on how to build one's own stub domain kernel
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Keir Fraser [Tue, 14 Oct 2008 10:10:46 +0000 (11:10 +0100)]
vt-d: Fix comment typos.
Signed-off-by: Ameya Palande <2ameya@gmail.com>
Keir Fraser [Tue, 14 Oct 2008 10:08:15 +0000 (11:08 +0100)]
hvm: Battery Management virtual firmware and toolstack changes
Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com>
Keir Fraser [Tue, 14 Oct 2008 09:45:29 +0000 (10:45 +0100)]
x86, hvm: Hyper-V guest interface support with small set of enlightenments
A minimal implementation of the Viridian (Hyper-V) guest
interface. The only enlightenments advertised and supported are vAPIC
MSRs and long-spin-wait notifications. The set of enlightenments can
easily be extended in future, as they are found to provide a
performance win, and configured via an extended HVM_PARAM_VIRIDIAN hvm
parameter.
Signed-off-by: Peter Johnston <peter.johnston@citrix.com>
Signed-off-by: Tim Deegan <tim.deegan@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 13 Oct 2008 12:15:20 +0000 (13:15 +0100)]
x86: propagate return value of alloc_l1_table()
A blatant mistake of mine resulted in the return value of
alloc_l1_table() to be ignored with the preemptable page table update
changes.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Mon, 13 Oct 2008 09:09:09 +0000 (10:09 +0100)]
vtd: move some x86-dependent functions into x86-specific directory.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Mon, 13 Oct 2008 09:08:36 +0000 (10:08 +0100)]
xend: fixup the Secondary Bus Reset.
Use the read-modify-write operation.
Change the wrong 'I' to a correct 'H'.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Mon, 13 Oct 2008 09:08:16 +0000 (10:08 +0100)]
iommu: Cleanups to some header files.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Mon, 13 Oct 2008 09:06:33 +0000 (10:06 +0100)]
xenpm: Fix logic when Hyperthreading is enabled.
Signed-off-by: Guanqun Lu <guanqun.lu@intel.com>
Keir Fraser [Mon, 13 Oct 2008 09:03:36 +0000 (10:03 +0100)]
xend: Fix dev backend path construction.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
Keir Fraser [Fri, 10 Oct 2008 10:52:26 +0000 (11:52 +0100)]
xend: Restore bridge control register after secondary bus reset
From: Chris Dalton <cid@hp.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Fri, 10 Oct 2008 09:18:06 +0000 (10:18 +0100)]
Merge with IA64 tree
Keir Fraser [Fri, 10 Oct 2008 09:11:34 +0000 (10:11 +0100)]
vmx: Update RIP past INT3 instruction on INT3 vmexit.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Fri, 10 Oct 2008 09:06:49 +0000 (10:06 +0100)]
vmx:update DR6 on TRAP_debug VM exits.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Keir Fraser [Fri, 10 Oct 2008 09:04:58 +0000 (10:04 +0100)]
vt-d: Fix dma_set_pte_superpage
Superpage bit is bit 7 in VT-d page table entry.
Signed-off-by: Weidong Han <weidong.han@intel.com>
Keir Fraser [Fri, 10 Oct 2008 09:03:28 +0000 (10:03 +0100)]
xend: Fix the detection of the upmost bridge in the python function find_parent().
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Fri, 10 Oct 2008 09:01:10 +0000 (10:01 +0100)]
cpufreq: remove unused variable cpu_count.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Keir Fraser [Fri, 10 Oct 2008 09:00:54 +0000 (10:00 +0100)]
acpi/pmstat.c: refer to the array after range check.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Keir Fraser [Fri, 10 Oct 2008 09:00:21 +0000 (10:00 +0100)]
[IA64] compile xenpm for ia64.
Now ia64 supports cpufreq, compile xenpm.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Isaku Yamahata [Fri, 10 Oct 2008 03:06:46 +0000 (12:06 +0900)]
merge with xen-unstable.hg
Isaku Yamahata [Fri, 10 Oct 2008 02:58:03 +0000 (11:58 +0900)]
[IA64] introduce iosapci ID.
introduce iosapci ID, which is used to index DMA engine covering this iosapic.
Signed-off-by; Anthony Xu <anthony.xu@intel.com>
Isaku Yamahata [Fri, 10 Oct 2008 02:57:23 +0000 (11:57 +0900)]
[IA64] Add pci configuration code, which is needed by VTD.
Signed-off-by; Anthony Xu <anthony.xu@intel.com>
Isaku Yamahata [Fri, 10 Oct 2008 02:47:07 +0000 (11:47 +0900)]
Add pci configuration code, which is needed by VTD
Signed-off-by; Anthony Xu <anthony.xu@intel.com>
Isaku Yamahata [Fri, 10 Oct 2008 02:17:24 +0000 (11:17 +0900)]
[IA64] implement ia64 cpufreq notify hypercall
This patch implement the ia64 cpufreq hypercall to get dom0 cpufreq ACPI info.
Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
Isaku Yamahata [Fri, 10 Oct 2008 02:17:24 +0000 (11:17 +0900)]
[IA64] Add cpufreq ia64 driver
For IA64 Platform, add cpufreq driver for ia64 cpu, implementing
cpufreq_driver->init()/ exit()/ verify()/ target()/ get()
Signed-off-by: Yu, Ke <ke.yu@intel.com>
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Keir Fraser [Thu, 9 Oct 2008 16:18:11 +0000 (17:18 +0100)]
hvmloader: smbios support for large memory guests
This reports more than one memory device if the memory for the guest
is larger than 16G.
Signed-off-by: Bill Rieske <brieske@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 9 Oct 2008 11:47:31 +0000 (12:47 +0100)]
vtd: Make some pci access functions architecture independent.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Thu, 9 Oct 2008 10:17:51 +0000 (11:17 +0100)]
Rename evtchn_lock to event_lock, since it protects more than just
event-channel state now.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 9 Oct 2008 10:14:52 +0000 (11:14 +0100)]
Fix lock issue for hvm pass-through domain
This patch protect the hvm_irq_dpci structure with evtchn_lock, thus
the access to domain's pirq_vector mapping is also protected.
Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
Keir Fraser [Thu, 9 Oct 2008 10:08:13 +0000 (11:08 +0100)]
vt-d: Define a struct IO_xAPIC_route_entry to accommodate both ioapic
and iosapic.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Thu, 9 Oct 2008 09:16:49 +0000 (10:16 +0100)]
xenpm: Fix typo bug.
From: Guanqun Lu <guanqun.lu@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 9 Oct 2008 09:15:30 +0000 (10:15 +0100)]
x86/mm: Use l1e_get_pfn() in destroy_grant_pte_mapping().
On x86_64 system, (pte >> PAGE_SHIFT) is not always equal to page
frame number because high bits (63:52) of pte may be used as
flags. This patch corrects the conversion and errors as below
disappear when applied.
(XEN) mm.c:3074:d0 PTE entry
200000a2ec6167 for address
a1f09958
doesn't match frame a2ec6
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
Keir Fraser [Thu, 9 Oct 2008 09:06:50 +0000 (10:06 +0100)]
xend: Fix typo _gatherDom -> gatherDom.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
Keir Fraser [Thu, 9 Oct 2008 09:05:41 +0000 (10:05 +0100)]
Allow to specify Linux kernel config file
The env variable XEN_LINUX_CONFIG is used to specify this
file.
Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
Keir Fraser [Wed, 8 Oct 2008 13:00:58 +0000 (14:00 +0100)]
x86: Remove bogus assertion from free_domain_pirqs().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 8 Oct 2008 12:11:06 +0000 (13:11 +0100)]
x86: Define __per_cpu_shift label to help kdump/crashdump.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 8 Oct 2008 10:59:01 +0000 (11:59 +0100)]
x86: Continue to allocate vectors across LAPIC priority levels, since
it's easy to do. It's not really necessary for modern non-buggy APICs
though.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 8 Oct 2008 10:51:39 +0000 (11:51 +0100)]
x86: Free MSI vector when a pirq is unmapped.
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 8 Oct 2008 09:48:48 +0000 (10:48 +0100)]
x86: Move pirq logic to irq.c.
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 8 Oct 2008 09:03:47 +0000 (10:03 +0100)]
flask: Fix a problem in xend code when starting a guest with XSM/Flask enabled.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Keir Fraser [Wed, 8 Oct 2008 09:03:09 +0000 (10:03 +0100)]
flask: Add 2 permissions to the default flask policy to get a VIF-enabled guest to work
This adds two more permissions to the default Flask policy to get a VM
with a network interface to work.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Keir Fraser [Wed, 8 Oct 2008 09:02:27 +0000 (10:02 +0100)]
flask: Fix to default policy to get simple VM running
This fix gets to the default Flask/XSM policy gets a simple guest VM
(Ramdisk only, no VIF) running.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Keir Fraser [Fri, 3 Oct 2008 08:42:11 +0000 (09:42 +0100)]
pygrub: fix the parameter `default' and `timeout' in elilo.conf
This patch fixes two issues related to the parameter `default' and
`timeout' in elilo.conf:
- LiloConf.py cannot interpret the parameter `default' and
`timeout'. The first kernel always boot up even if the second kernel
is specified by `default'. And `timeout' is ignored.
This issue is introduced by cset 15953:
70bb28b62ffb.
- If two kernels or more are installed, the last kernel cannot boot
up even if it is specified by `default'.
Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
Keir Fraser [Fri, 3 Oct 2008 08:37:35 +0000 (09:37 +0100)]
xend: Allow guest write access to /local/domain/x/memory
Required for xenballoond, and tools do not need to trust any values
written in that subdirectory.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Isaku Yamahata [Fri, 3 Oct 2008 03:50:28 +0000 (12:50 +0900)]
[IA64] libxc: make xc_ia64_copy_memmap use DOM0VP_get_memmap.
Guest domain's memory map may be updated concurrently so that
it is protected sequence lock.
This patch makes xc_ia64_copy_memmap() use DOM0VP_get_memmap
hypercall to avoid the race.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Isaku Yamahata [Fri, 3 Oct 2008 03:49:55 +0000 (12:49 +0900)]
[IA64] introduce DOM0VP_get_memmap hypercall.
introduce new dom0vp hypercall, DOM0VP_get_memmap,
to get memmap of a given domain without race.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Isaku Yamahata [Fri, 3 Oct 2008 03:49:04 +0000 (12:49 +0900)]
[IA64] fix XENMEM_add_to_physmap with XENMAPSPACE_mfn.
This patch fixes HVM domain save/restore.
Tools stack is aware of where memory is populated in guest domain.
But XENMEM_add_to_physmap with XENMAPSPACE_mfn doesn't update
the information related to guest memory map. So guest domain
save/dump-core fails to dump pages which were added by the hypercall.
This patch makes the hypercall update the memory map information
of a given guest domain.
This introduces the race between writers and readers of
the info. Later a new hypercall will be introduced to get memmap
from the guest with lock which prevents this race.
Even if the tools stack can get the memmap by foreign
domain page mapping, it should get memmap by the
newly added hypercall which will be added later.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Isaku Yamahata [Fri, 3 Oct 2008 03:24:49 +0000 (12:24 +0900)]
[IA64] make use of rcu_lock_target_domain_by_id()
reduce code duplication by using rcu_lock_target_domain_by_id()
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Isaku Yamahata [Fri, 3 Oct 2008 02:49:07 +0000 (11:49 +0900)]
merge with xen-unstable.hg
Keir Fraser [Thu, 2 Oct 2008 11:56:55 +0000 (12:56 +0100)]
libblktap: Remove trailing null byte in xs_printf
xs_printf writes the terminating null byte of the passed string to
Xenstore. When reading, the null byte is returned in the following
form which confuses tools:
sector-size = "512\000"
This patch removes the null byte from the data to write.
Signed-off-by: Kevin Wolf <kwolf@suse.de>
Keir Fraser [Thu, 2 Oct 2008 10:39:36 +0000 (11:39 +0100)]
Eliminate code duplication with rcu_lock_domain_by_id().
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Keir Fraser [Thu, 2 Oct 2008 10:32:08 +0000 (11:32 +0100)]
xc_ptrace: Allow gdbserver to connect to a guest before APs are
brought online.
Signed-off-by: Kip Macy <kmacy@freebsd.org>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 2 Oct 2008 09:37:28 +0000 (10:37 +0100)]
xend: Make only selected subdirs of /local/domain/<domid> writable by the guest.
This protects critical data like
/local/domain/<domid>/console/{tty,limit}. It also means we can trust
.../vm, and hence do not need /vm_path. Various parts of the previous
two changesets disappear.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Isaku Yamahata [Thu, 2 Oct 2008 08:27:57 +0000 (17:27 +0900)]
[IA64] libxc clean up.
remove code duplication between xc_ia64_linux_save.c and xc_core_ia64.c
by introducing xc_ia64_copy_memmap().
Later xc_ia64_copy_memmap() will be enhanced.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Isaku Yamahata [Thu, 2 Oct 2008 08:27:57 +0000 (17:27 +0900)]
[IA64] xc restore: fix domain restore.
Fix domain restore of version one format.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Isaku Yamahata [Thu, 2 Oct 2008 08:27:57 +0000 (17:27 +0900)]
[IA64] hvm builder: more precisely use of memory size.
So far, VGA io size is ignored and memory size which assigned to
domain is smaller than what user specified by VGA io size.
This patch take VGA io size into consideration when memory population.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Isaku Yamahata [Thu, 2 Oct 2008 08:27:57 +0000 (17:27 +0900)]
[IA64] libxc: improve foreign p2m exposure.
make foreign p2m exposure _PAGE_IO_BIT aware for robustness.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Isaku Yamahata [Thu, 2 Oct 2008 06:32:54 +0000 (15:32 +0900)]
merge with xen-unstable.hg
Keir Fraser [Wed, 1 Oct 2008 13:07:17 +0000 (14:07 +0100)]
xend: Fixes after backend xenstore config changes.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 1 Oct 2008 12:35:39 +0000 (13:35 +0100)]
xend: Move some backend configuration info.
This patch moves some dom0 variables and backend device
configuration from frontend directories to
/local/domain/<backdomid>/backend or /vm.
Also,
- /vm_path/<domid> is introduced, referencing the /vm path
- /vm_path/device/backend holds the backend device location,
rather than storing it in the frontend directory
Signed-off-by: Pascal Bouchareine <pascal@gandi.net>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 1 Oct 2008 08:31:13 +0000 (09:31 +0100)]
[IA64] Compilation fix to cpufreq stuff.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Keir Fraser [Tue, 30 Sep 2008 09:14:54 +0000 (10:14 +0100)]
x86, hvm: Expose host core/HT topology to HVM guests.
Based on an initial patch by Nitin Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 29 Sep 2008 14:45:38 +0000 (15:45 +0100)]
hvm: Remove extboot from virtual firmware.
Device model is not present in external qemu repository, and
functionality was never exposed through the toolstack.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 29 Sep 2008 10:00:29 +0000 (11:00 +0100)]
xc_save: use correct size when unmapping live p2m.
Otherwise we unmap a larger region than was mapped when saving 32 bit
guest from 64 bit tools, leading to badness.
The equivalent change was made to the restore code in
18329:
ca7dd77d5365
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Keir Fraser [Mon, 29 Sep 2008 08:43:05 +0000 (09:43 +0100)]
domctl: Fix the wrong return values when xsm_xxx() returns 0
In 18423:
44f039c4aee4, if xsm_xxx() returns 0, there are some places
where the return value would be incorrect. The patch fixes them.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Sun, 28 Sep 2008 15:53:14 +0000 (16:53 +0100)]
Fix 32pae build: ld -> PRI64.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Fri, 26 Sep 2008 16:12:56 +0000 (17:12 +0100)]
CPUIDLE: Initialize timer broadcast mechanism for C2
Without this patch, while running on platforms on which the deepest
C-state is C2, acpi_processor_idle fns will call into NULL
function. This has been the case since 18518:
e61c7833dc9d8.
Signed-off-by: Wei Gang <gang.wei@intel.com>
Keir Fraser [Fri, 26 Sep 2008 16:09:36 +0000 (17:09 +0100)]
hvm: Default timer_mode=1 (do not delay virtual time for missed
ticks). Most guests prefer this mode compared with screwing with
progress of virtual time.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Fri, 26 Sep 2008 14:33:51 +0000 (15:33 +0100)]
x86 shadow: Add FreeBSD mappings guest heuristics.
This patch adds FreeBSD mappings heuristics to allow faster page
promotion.
Also, remove code for unsync va heuristic, not needed anymore.
Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
Keir Fraser [Fri, 26 Sep 2008 13:05:41 +0000 (14:05 +0100)]
x86 and ia64: move cpufreq notify code to commone place
This patch move the cpufreq notify code from x86 specfic place to
common place, since it can be used by both x86 and ia64 cpufreq
driver.
Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
Signed-off-by: Yu Ke <ke.yu@intel.com>